package com.zzyl.controller;

import com.zzyl.base.PageResponse;
import com.zzyl.base.ResponseResult;
import com.zzyl.dto.DeviceDataPageReqDto;
import com.zzyl.service.DeviceDataService;
import com.zzyl.vo.DeviceDataVo;
import com.zzyl.vo.ProductVo;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

import static com.zzyl.base.ResponseResult.success;

@Api(tags = "设备数据")
@RequestMapping("/device-data")
@RestController
public class DeviceDataController {
    @Autowired
    private DeviceDataService deviceDataService;

    @GetMapping("/get-page")
    public ResponseResult<PageResponse<DeviceDataVo>> getPage(DeviceDataPageReqDto deviceDataPageReqDto){
        PageResponse<DeviceDataVo> pageResponse = deviceDataService.getPage(deviceDataPageReqDto);
        return success(pageResponse);
    }
}
